Skip to content

fix(nav3): Prevent NaN and infinite arguments from dropping SentryEvents and SentryTransactions - #6713

Open
0xadam-brown wants to merge 2 commits into
mainfrom
0xadam-brown/fix/nav3-non-finite-arguments
Open

0xadam-brown wants to merge 2 commits into
mainfrom
0xadam-brown/fix/nav3-non-finite-arguments

Conversation

@0xadam-brown

@0xadam-brown 0xadam-brown commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

📜 Description

PR fixes an edge-case bug in our Nav3 integration that could cause SentryEvents or Transactions to be dropped SDK-side if back stack entry arguments contained non-finite numeric values.

Now we convert NaN and positive or negative infinity values in back stack entry arguments to strings instead of passing them to the transport layer's JSON serializer unchanged.

💡 Motivation and Context

Our Nav3 integration attaches nav arguments to SentryEvents and SentryTransactions. JSON can't represent NaN or infinity, so an argument containing one of those values can cause serialization of the entire event or transaction to fail. Converting these values to strings preserves the argument’s value while allowing the containing event or transaction to be sent.

💚 How did you test it?

Unit tests + regression tests

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🔮 Next steps

Keep navigation arguments JSON-compatible so non-finite numbers cannot prevent the containing report from being serialized.

Refs JAVA-787
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Nov 20, 2026
@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

PR risk: medium

For commit f360490.

Main concerns: data sent to Sentry, host performance, reach.

This label is a hint for reviewers, not an approval.

@sentry

sentry Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.65.0 (1) release

⚙️ sentry-android Build Distribution Settings

@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Nov 20, 2026
@0xadam-brown 0xadam-brown added the sanity-check PR needs a lightweight review for obvious issues label Nov 20, 2026
@0xadam-brown 0xadam-brown changed the title fix(nav3): Preserve reports containing NaN or infinite arguments fix(nav3): Prevent NaN and infinite arguments from dropping SentryEvents and transactions Nov 20, 2026
@0xadam-brown
0xadam-brown marked this pull request as ready for review November 20, 2026 16:16
@0xadam-brown
0xadam-brown requested review from a team and adinauer as code owners November 20, 2026 16:16
@0xadam-brown
0xadam-brown requested review from markushi and runningcode and removed request for a team November 20, 2026 16:16
@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Nov 20, 2026
@0xadam-brown 0xadam-brown changed the title fix(nav3): Prevent NaN and infinite arguments from dropping SentryEvents and transactions fix(nav3): Prevent NaN and infinite arguments from dropping SentryEvents and SentryTransactions Nov 20, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium sanity-check PR needs a lightweight review for obvious issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant